1 /*
2  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
3  * Copyright (c) 2017 Intel Corporation.
4  * Copyright (c) 2018 Nordic Semiconductor ASA
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Generic configuration for TLS, manageable by Kconfig.
9  */
10 
11 #ifndef MBEDTLS_CONFIG_H
12 #define MBEDTLS_CONFIG_H
13 
14 /* System support */
15 #define MBEDTLS_PLATFORM_C
16 #define MBEDTLS_PLATFORM_MEMORY
17 #define MBEDTLS_MEMORY_BUFFER_ALLOC_C
18 #define MBEDTLS_MEMORY_ALIGN_MULTIPLE (sizeof(void *))
19 #define MBEDTLS_PLATFORM_EXIT_ALT
20 #define MBEDTLS_NO_PLATFORM_ENTROPY
21 
22 #if defined(CONFIG_MBEDTLS_ZEROIZE_ALT)
23 #define MBEDTLS_PLATFORM_ZEROIZE_ALT
24 #endif
25 
26 #if defined(CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR)
27 #define MBEDTLS_ENTROPY_HARDWARE_ALT
28 #else
29 #define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
30 #endif
31 
32 #if defined(CONFIG_MBEDTLS_HAVE_ASM)
33 #define MBEDTLS_HAVE_ASM
34 #endif
35 
36 #if defined(CONFIG_MBEDTLS_LMS)
37 #define MBEDTLS_LMS_C
38 #endif
39 
40 #if defined(CONFIG_MBEDTLS_HAVE_TIME_DATE)
41 #define MBEDTLS_HAVE_TIME
42 #define MBEDTLS_HAVE_TIME_DATE
43 #define MBEDTLS_PLATFORM_MS_TIME_ALT
44 #endif
45 
46 #if defined(CONFIG_MBEDTLS_TEST)
47 #define MBEDTLS_SELF_TEST
48 #define MBEDTLS_DEBUG_C
49 #endif
50 
51 /* mbedTLS feature support */
52 
53 /* Supported TLS versions */
54 
55 
56 #if defined(CONFIG_MBEDTLS_TLS_VERSION_1_2)
57 #define MBEDTLS_SSL_PROTO_TLS1_2
58 #endif
59 
60 #if defined(CONFIG_MBEDTLS_TLS_VERSION_1_3)
61 #define MBEDTLS_SSL_PROTO_TLS1_3
62 #define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
63 #define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
64 #endif
65 
66 #if defined(CONFIG_MBEDTLS_TLS_VERSION_1_2) || \
67 	defined(CONFIG_MBEDTLS_TLS_VERSION_1_3)
68 
69 /* Common modules required for TLS 1.2 and 1.3 */
70 #define MBEDTLS_SSL_TLS_C
71 #define MBEDTLS_SSL_SRV_C
72 #define MBEDTLS_SSL_CLI_C
73 
74 /* This is not supported by Mbed TLS in TLS 1.3 mode
75  * (see modules/crypto/mbedtls/docs/architecture/tls13-support.md).
76  */
77 #if !defined(CONFIG_MBEDTLS_TLS_VERSION_1_3)
78 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
79 #endif
80 
81 #endif /* CONFIG_MBEDTLS_TLS_VERSION_1_2 || CONFIG_MBEDTLS_TLS_VERSION_1_3 */
82 
83 #if defined(CONFIG_MBEDTLS_TLS_SESSION_TICKETS)
84 #define MBEDTLS_SSL_SESSION_TICKETS
85 #define MBEDTLS_SSL_TICKET_C
86 #endif
87 
88 #if defined(CONFIG_MBEDTLS_DTLS)
89 #define MBEDTLS_SSL_PROTO_DTLS
90 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
91 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
92 #define MBEDTLS_SSL_COOKIE_C
93 #endif
94 
95 /* Supported key exchange methods */
96 
97 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
98 #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
99 #endif
100 
101 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
102 #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
103 #endif
104 
105 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
106 #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
107 #endif
108 
109 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
110 #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
111 #endif
112 
113 #if defined(CONFIG_MBEDTLS_PSK_MAX_LEN)
114 #define MBEDTLS_PSK_MAX_LEN	CONFIG_MBEDTLS_PSK_MAX_LEN
115 #endif
116 
117 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
118 #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
119 #endif
120 
121 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
122 #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
123 #endif
124 
125 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
126 #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
127 #endif
128 
129 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
130 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
131 #endif
132 
133 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
134 #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
135 #endif
136 
137 #if defined(CONFIG_MBEDTLS_ECDSA_DETERMINISTIC)
138 #define MBEDTLS_ECDSA_DETERMINISTIC
139 #endif
140 
141 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
142 #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
143 #endif
144 
145 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
146 #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
147 #endif
148 
149 #if defined(CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED)
150 #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
151 #define MBEDTLS_SSL_EARLY_DATA
152 #endif
153 
154 #if defined(CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED)
155 #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
156 #endif
157 
158 #if defined(CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED)
159 #define MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
160 #define MBEDTLS_SSL_EARLY_DATA
161 #endif
162 
163 #if defined(CONFIG_MBEDTLS_HKDF_C)
164 #define MBEDTLS_HKDF_C
165 #endif
166 
167 /* Supported cipher modes */
168 
169 #if defined(CONFIG_MBEDTLS_CIPHER_AES_ENABLED)
170 #define MBEDTLS_AES_C
171 #endif
172 
173 #if defined(CONFIG_MBEDTLS_AES_ROM_TABLES)
174 #define MBEDTLS_AES_ROM_TABLES
175 #endif
176 
177 #if defined(CONFIG_MBEDTLS_AES_FEWER_TABLES)
178 #define MBEDTLS_AES_FEWER_TABLES
179 #endif
180 
181 #if defined(CONFIG_MBEDTLS_CIPHER_CAMELLIA_ENABLED)
182 #define MBEDTLS_CAMELLIA_C
183 #endif
184 
185 #if defined(CONFIG_MBEDTLS_CIPHER_DES_ENABLED)
186 #define MBEDTLS_DES_C
187 #endif
188 
189 #if defined(CONFIG_MBEDTLS_CIPHER_CHACHA20_ENABLED)
190 #define MBEDTLS_CHACHA20_C
191 #endif
192 
193 #if defined(CONFIG_MBEDTLS_CIPHER_CCM_ENABLED)
194 #define MBEDTLS_CCM_C
195 #endif
196 
197 #if defined(CONFIG_MBEDTLS_CIPHER_GCM_ENABLED)
198 #define MBEDTLS_GCM_C
199 #endif
200 
201 #if defined(CONFIG_MBEDTLS_CIPHER_MODE_XTS_ENABLED)
202 #define MBEDTLS_CIPHER_MODE_XTS
203 #endif
204 
205 #if defined(CONFIG_MBEDTLS_CIPHER_MODE_CBC_ENABLED)
206 #define MBEDTLS_CIPHER_MODE_CBC
207 #endif
208 
209 #if defined(CONFIG_MBEDTLS_CIPHER_MODE_CTR_ENABLED)
210 #define MBEDTLS_CIPHER_MODE_CTR
211 #endif
212 
213 /* Supported elliptic curve libraries */
214 
215 #if defined(CONFIG_MBEDTLS_ECDH_C)
216 #define MBEDTLS_ECDH_C
217 #endif
218 
219 #if defined(CONFIG_MBEDTLS_ECDSA_C)
220 #define MBEDTLS_ECDSA_C
221 #endif
222 
223 #if defined(CONFIG_MBEDTLS_ECJPAKE_C)
224 #define MBEDTLS_ECJPAKE_C
225 #endif
226 
227 #if defined(CONFIG_MBEDTLS_ECP_C)
228 #define MBEDTLS_ECP_C
229 #endif
230 
231 /* Supported elliptic curves */
232 
233 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED)
234 #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
235 #endif
236 
237 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED)
238 #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
239 #endif
240 
241 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED)
242 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
243 #endif
244 
245 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED)
246 #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
247 #endif
248 
249 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED)
250 #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
251 #endif
252 
253 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED)
254 #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
255 #endif
256 
257 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED)
258 #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
259 #endif
260 
261 #if defined(CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED)
262 #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
263 #endif
264 
265 #if defined(CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED)
266 #define MBEDTLS_ECP_DP_BP256R1_ENABLED
267 #endif
268 
269 #if defined(CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED)
270 #define MBEDTLS_ECP_DP_BP384R1_ENABLED
271 #endif
272 
273 #if defined(CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED)
274 #define MBEDTLS_ECP_DP_BP512R1_ENABLED
275 #endif
276 
277 #if defined(CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED)
278 #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
279 #endif
280 
281 #if defined(CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED)
282 #define MBEDTLS_ECP_DP_CURVE448_ENABLED
283 #endif
284 
285 #if defined(CONFIG_MBEDTLS_ECP_NIST_OPTIM)
286 #define MBEDTLS_ECP_NIST_OPTIM
287 #endif
288 
289 /* Supported hash algorithms */
290 
291 #if defined(CONFIG_MBEDTLS_MD5)
292 #define MBEDTLS_MD5_C
293 #endif
294 
295 #if defined(CONFIG_MBEDTLS_SHA1)
296 #define MBEDTLS_SHA1_C
297 #endif
298 
299 #if defined(CONFIG_MBEDTLS_SHA224)
300 #define MBEDTLS_SHA224_C
301 #endif
302 
303 #if defined(CONFIG_MBEDTLS_SHA256)
304 #define MBEDTLS_SHA256_C
305 #endif
306 
307 #if defined(CONFIG_MBEDTLS_SHA256_SMALLER)
308 #define MBEDTLS_SHA256_SMALLER
309 #endif
310 
311 #if defined(CONFIG_MBEDTLS_SHA384)
312 #define MBEDTLS_SHA384_C
313 #endif
314 
315 #if defined(CONFIG_MBEDTLS_SHA512)
316 #define MBEDTLS_SHA512_C
317 #endif
318 
319 #if defined(CONFIG_MBEDTLS_POLY1305)
320 #define MBEDTLS_POLY1305_C
321 #endif
322 
323 #if defined(CONFIG_MBEDTLS_CMAC)
324 #define MBEDTLS_CMAC_C
325 #endif
326 
327 /* mbedTLS modules */
328 #if defined(CONFIG_MBEDTLS_CTR_DRBG_ENABLED)
329 #define MBEDTLS_CTR_DRBG_C
330 #endif
331 
332 #if defined(CONFIG_MBEDTLS_HMAC_DRBG_ENABLED)
333 #define MBEDTLS_HMAC_DRBG_C
334 #endif
335 
336 #if defined(CONFIG_MBEDTLS_DEBUG)
337 #define MBEDTLS_ERROR_C
338 #define MBEDTLS_DEBUG_C
339 #define MBEDTLS_SSL_DEBUG_ALL
340 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
341 #endif
342 
343 #if defined(CONFIG_MBEDTLS_MEMORY_DEBUG)
344 #define MBEDTLS_MEMORY_DEBUG
345 #endif
346 
347 #if defined(CONFIG_MBEDTLS_CHACHAPOLY_AEAD_ENABLED)
348 #define MBEDTLS_CHACHAPOLY_C
349 #endif
350 
351 #if defined(CONFIG_MBEDTLS_GENPRIME_ENABLED)
352 #define MBEDTLS_GENPRIME
353 #endif
354 
355 #if defined(CONFIG_MBEDTLS_ENTROPY_C)
356 #define MBEDTLS_ENTROPY_C
357 #endif
358 
359 #if defined(CONFIG_MBEDTLS_SSL_ALPN)
360 #define MBEDTLS_SSL_ALPN
361 #endif
362 
363 #if defined(CONFIG_MBEDTLS_CIPHER)
364 #define MBEDTLS_CIPHER_C
365 #endif
366 
367 #if defined(CONFIG_MBEDTLS_MD)
368 #define MBEDTLS_MD_C
369 #endif
370 
371 /* Automatic dependencies */
372 
373 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) || \
374     defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
375 #define MBEDTLS_DHM_C
376 #endif
377 
378 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) || \
379     defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \
380     defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \
381     defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
382 #define MBEDTLS_RSA_C
383 #define MBEDTLS_PKCS1_V15
384 #define MBEDTLS_PKCS1_V21
385 #endif
386 
387 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) || \
388 	defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \
389 	defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \
390 	defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \
391 	defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \
392 	defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) || \
393 	defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \
394 	defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED)
395 #define MBEDTLS_X509_CRT_PARSE_C
396 #endif
397 
398 #if defined(CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT) && \
399     defined(MBEDTLS_X509_CRT_PARSE_C)
400 #define MBEDTLS_PEM_PARSE_C
401 #define MBEDTLS_PEM_WRITE_C
402 #define MBEDTLS_BASE64_C
403 #endif
404 
405 #if defined(MBEDTLS_X509_CRT_PARSE_C)
406 #define MBEDTLS_X509_USE_C
407 #endif
408 
409 #if defined(MBEDTLS_DHM_C) || \
410     defined(MBEDTLS_ECP_C) || \
411     defined(MBEDTLS_RSA_C) || \
412     defined(MBEDTLS_X509_USE_C) || \
413     defined(MBEDTLS_GENPRIME)
414 #define MBEDTLS_BIGNUM_C
415 #endif
416 
417 #if defined(MBEDTLS_RSA_C) || \
418     defined(MBEDTLS_X509_USE_C)
419 #define MBEDTLS_OID_C
420 #endif
421 
422 #if defined(MBEDTLS_X509_USE_C)
423 #define MBEDTLS_PK_PARSE_C
424 #endif
425 
426 #if defined(CONFIG_MBEDTLS_PK_WRITE_C)
427 #define MBEDTLS_PK_WRITE_C
428 #endif
429 
430 #if defined(MBEDTLS_PK_PARSE_C) || defined(MBEDTLS_PK_WRITE_C)
431 #define MBEDTLS_PK_C
432 #endif
433 
434 #if defined(MBEDTLS_ECDSA_C) || defined(MBEDTLS_X509_USE_C)
435 #define MBEDTLS_ASN1_PARSE_C
436 #endif
437 
438 #if defined(MBEDTLS_ECDSA_C) || defined(MBEDTLS_RSA_C) || defined(MBEDTLS_PK_WRITE_C)
439 #define MBEDTLS_ASN1_WRITE_C
440 #endif
441 
442 #if defined(CONFIG_MBEDTLS_PKCS5_C)
443 #define MBEDTLS_PKCS5_C
444 #endif
445 
446 #define MBEDTLS_SSL_IN_CONTENT_LEN  CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN
447 #define MBEDTLS_SSL_OUT_CONTENT_LEN  CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN
448 
449 /* Enable OpenThread optimizations. */
450 #if defined(CONFIG_MBEDTLS_OPENTHREAD_OPTIMIZATIONS_ENABLED)
451 #define MBEDTLS_MPI_WINDOW_SIZE            1 /**< Maximum windows size used. */
452 #define MBEDTLS_MPI_MAX_SIZE              32 /**< Maximum number of bytes for usable MPIs. */
453 #define MBEDTLS_ECP_WINDOW_SIZE            2 /**< Maximum window size used */
454 #define MBEDTLS_ECP_FIXED_POINT_OPTIM      0 /**< Enable fixed-point speed-up */
455 #define MBEDTLS_ENTROPY_MAX_SOURCES        1 /**< Maximum number of sources supported */
456 #endif
457 
458 #if defined(CONFIG_MBEDTLS_SERVER_NAME_INDICATION) && \
459 	defined(MBEDTLS_X509_CRT_PARSE_C)
460 #define MBEDTLS_SSL_SERVER_NAME_INDICATION
461 #endif
462 
463 #if defined(CONFIG_MBEDTLS_SSL_CACHE_C)
464 #define MBEDTLS_SSL_CACHE_C
465 #define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT CONFIG_MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT
466 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES CONFIG_MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES
467 #endif
468 
469 #if defined(CONFIG_MBEDTLS_SSL_EXTENDED_MASTER_SECRET)
470 #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
471 #endif
472 
473 #if defined(CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
474 #define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
475 #endif
476 
477 #if defined(CONFIG_MBEDTLS_PSA_CRYPTO_C)
478 #define MBEDTLS_PSA_CRYPTO_C
479 #define MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
480 
481 #if defined(CONFIG_MBEDTLS_PSA_P256M_DRIVER_ENABLED)
482 #define MBEDTLS_PSA_P256M_DRIVER_ENABLED
483 #endif
484 
485 #if defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC) && !defined(CONFIG_SECURE_STORAGE)
486 #define MBEDTLS_PSA_ITS_FILE_C
487 #define MBEDTLS_PSA_CRYPTO_STORAGE_C
488 #define MBEDTLS_FS_IO
489 #endif
490 
491 #if defined(CONFIG_SECURE_STORAGE)
492 #define MBEDTLS_PSA_CRYPTO_STORAGE_C
493 #endif
494 
495 #endif /* CONFIG_MBEDTLS_PSA_CRYPTO_C */
496 
497 #if defined(CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS)
498 #define MBEDTLS_PSA_STATIC_KEY_SLOTS
499 #endif
500 
501 #if defined(CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT)
502 #define MBEDTLS_PSA_KEY_SLOT_COUNT CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT
503 #endif
504 
505 #if defined(CONFIG_MBEDTLS_USE_PSA_CRYPTO)
506 #define MBEDTLS_USE_PSA_CRYPTO
507 #endif
508 
509 #if defined(CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT)
510 #define MBEDTLS_PSA_CRYPTO_CLIENT
511 #define MBEDTLS_PSA_CRYPTO_CONFIG
512 #define MBEDTLS_PSA_CRYPTO_CONFIG_FILE   "config-psa.h"
513 #endif
514 
515 #if defined(CONFIG_MBEDTLS_TLS_VERSION_1_2) && defined(CONFIG_MBEDTLS_PSA_CRYPTO_C)
516 #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
517 #endif
518 
519 #if defined(CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID)
520 #define MBEDTLS_SSL_DTLS_CONNECTION_ID
521 #endif
522 
523 #if defined(CONFIG_MBEDTLS_NIST_KW_C)
524 #define MBEDTLS_NIST_KW_C
525 #endif
526 
527 #if defined(CONFIG_MBEDTLS_DHM_C)
528 #define MBEDTLS_DHM_C
529 #endif
530 
531 #if defined(CONFIG_MBEDTLS_X509_CRL_PARSE_C)
532 #define MBEDTLS_X509_CRL_PARSE_C
533 #endif
534 
535 #if defined(CONFIG_MBEDTLS_X509_CSR_WRITE_C)
536 #define MBEDTLS_X509_CSR_WRITE_C
537 #define MBEDTLS_X509_CREATE_C
538 #endif
539 
540 #if defined(CONFIG_MBEDTLS_X509_CSR_PARSE_C)
541 #define MBEDTLS_X509_CSR_PARSE_C
542 #endif
543 
544 #if defined(CONFIG_MBEDTLS_X509_CRT_WRITE_C)
545 #define MBEDTLS_X509_CRT_WRITE_C
546 #endif
547 
548 #if defined(CONFIG_MBEDTLS_USER_CONFIG_FILE)
549 #include CONFIG_MBEDTLS_USER_CONFIG_FILE
550 #endif
551 
552 #endif /* MBEDTLS_CONFIG_H */
553