29 #ifndef MBEDTLS_CHECK_CONFIG_H
30 #define MBEDTLS_CHECK_CONFIG_H
38 #error "mbed TLS requires a platform with 8-bit chars"
42 #if !defined(MBEDTLS_PLATFORM_C)
43 #error "MBEDTLS_PLATFORM_C is required on Windows"
48 #if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \
49 !defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO)
50 #define MBEDTLS_PLATFORM_SNPRINTF_ALT
54 #if defined(TARGET_LIKE_MBED) && \
55 ( defined(MBEDTLS_NET_C) || defined(MBEDTLS_TIMING_C) )
56 #error "The NET and TIMING modules are not available for mbed OS - please use the network and timing functions provided by mbed OS"
59 #if defined(MBEDTLS_DEPRECATED_WARNING) && \
60 !defined(__GNUC__) && !defined(__clang__)
61 #error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
64 #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME)
65 #error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense"
68 #if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM)
69 #error "MBEDTLS_AESNI_C defined, but not all prerequisites"
72 #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C)
73 #error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
76 #if defined(MBEDTLS_DHM_C) && !defined(MBEDTLS_BIGNUM_C)
77 #error "MBEDTLS_DHM_C defined, but not all prerequisites"
80 #if defined(MBEDTLS_ECDH_C) && !defined(MBEDTLS_ECP_C)
81 #error "MBEDTLS_ECDH_C defined, but not all prerequisites"
84 #if defined(MBEDTLS_ECDSA_C) && \
85 ( !defined(MBEDTLS_ECP_C) || \
86 !defined(MBEDTLS_ASN1_PARSE_C) || \
87 !defined(MBEDTLS_ASN1_WRITE_C) )
88 #error "MBEDTLS_ECDSA_C defined, but not all prerequisites"
91 #if defined(MBEDTLS_ECJPAKE_C) && \
92 ( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) )
93 #error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
96 #if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C)
97 #error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites"
100 #if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \
101 !defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && \
102 !defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && \
103 !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && \
104 !defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) && \
105 !defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) && \
106 !defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && \
107 !defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) && \
108 !defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && \
109 !defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && \
110 !defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && \
111 !defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) )
112 #error "MBEDTLS_ECP_C defined, but not all prerequisites"
115 #if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \
116 !defined(MBEDTLS_SHA256_C))
117 #error "MBEDTLS_ENTROPY_C defined, but not all prerequisites"
119 #if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_SHA512_C) && \
120 defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 64)
121 #error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high"
123 #if defined(MBEDTLS_ENTROPY_C) && \
124 ( !defined(MBEDTLS_SHA512_C) || defined(MBEDTLS_ENTROPY_FORCE_SHA256) ) \
125 && defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 32)
126 #error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high"
128 #if defined(MBEDTLS_ENTROPY_C) && \
129 defined(MBEDTLS_ENTROPY_FORCE_SHA256) && !defined(MBEDTLS_SHA256_C)
130 #error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
133 #if defined(MBEDTLS_GCM_C) && ( \
134 !defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) )
135 #error "MBEDTLS_GCM_C defined, but not all prerequisites"
138 #if defined(MBEDTLS_HAVEGE_C) && !defined(MBEDTLS_TIMING_C)
139 #error "MBEDTLS_HAVEGE_C defined, but not all prerequisites"
142 #if defined(MBEDTLS_HMAC_DRBG_C) && !defined(MBEDTLS_MD_C)
143 #error "MBEDTLS_HMAC_DRBG_C defined, but not all prerequisites"
146 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
147 ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) )
148 #error "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
151 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
152 ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) )
153 #error "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
156 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(MBEDTLS_DHM_C)
157 #error "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
160 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
161 !defined(MBEDTLS_ECDH_C)
162 #error "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
165 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
166 ( !defined(MBEDTLS_DHM_C) || !defined(MBEDTLS_RSA_C) || \
167 !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) )
168 #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
171 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
172 ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_RSA_C) || \
173 !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) )
174 #error "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
177 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
178 ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_ECDSA_C) || \
179 !defined(MBEDTLS_X509_CRT_PARSE_C) )
180 #error "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
183 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
184 ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \
185 !defined(MBEDTLS_PKCS1_V15) )
186 #error "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
189 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \
190 ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \
191 !defined(MBEDTLS_PKCS1_V15) )
192 #error "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
195 #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \
196 ( !defined(MBEDTLS_ECJPAKE_C) || !defined(MBEDTLS_SHA256_C) || \
197 !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) )
198 #error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites"
201 #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \
202 ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
203 #error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
206 #if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM)
207 #error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
210 #if defined(MBEDTLS_PEM_PARSE_C) && !defined(MBEDTLS_BASE64_C)
211 #error "MBEDTLS_PEM_PARSE_C defined, but not all prerequisites"
214 #if defined(MBEDTLS_PEM_WRITE_C) && !defined(MBEDTLS_BASE64_C)
215 #error "MBEDTLS_PEM_WRITE_C defined, but not all prerequisites"
218 #if defined(MBEDTLS_PK_C) && \
219 ( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) )
220 #error "MBEDTLS_PK_C defined, but not all prerequisites"
223 #if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_PK_C)
224 #error "MBEDTLS_PK_PARSE_C defined, but not all prerequisites"
227 #if defined(MBEDTLS_PK_WRITE_C) && !defined(MBEDTLS_PK_C)
228 #error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites"
231 #if defined(MBEDTLS_PKCS11_C) && !defined(MBEDTLS_PK_C)
232 #error "MBEDTLS_PKCS11_C defined, but not all prerequisites"
235 #if defined(MBEDTLS_PLATFORM_EXIT_ALT) && !defined(MBEDTLS_PLATFORM_C)
236 #error "MBEDTLS_PLATFORM_EXIT_ALT defined, but not all prerequisites"
239 #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) && !defined(MBEDTLS_PLATFORM_C)
240 #error "MBEDTLS_PLATFORM_EXIT_MACRO defined, but not all prerequisites"
243 #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) &&\
244 ( defined(MBEDTLS_PLATFORM_STD_EXIT) ||\
245 defined(MBEDTLS_PLATFORM_EXIT_ALT) )
246 #error "MBEDTLS_PLATFORM_EXIT_MACRO and MBEDTLS_PLATFORM_STD_EXIT/MBEDTLS_PLATFORM_EXIT_ALT cannot be defined simultaneously"
249 #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
250 #error "MBEDTLS_PLATFORM_FPRINTF_ALT defined, but not all prerequisites"
253 #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
254 #error "MBEDTLS_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites"
257 #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) &&\
258 ( defined(MBEDTLS_PLATFORM_STD_FPRINTF) ||\
259 defined(MBEDTLS_PLATFORM_FPRINTF_ALT) )
260 #error "MBEDTLS_PLATFORM_FPRINTF_MACRO and MBEDTLS_PLATFORM_STD_FPRINTF/MBEDTLS_PLATFORM_FPRINTF_ALT cannot be defined simultaneously"
263 #if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\
264 ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
265 #error "MBEDTLS_PLATFORM_FREE_MACRO defined, but not all prerequisites"
268 #if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\
269 defined(MBEDTLS_PLATFORM_STD_FREE)
270 #error "MBEDTLS_PLATFORM_FREE_MACRO and MBEDTLS_PLATFORM_STD_FREE cannot be defined simultaneously"
273 #if defined(MBEDTLS_PLATFORM_FREE_MACRO) && !defined(MBEDTLS_PLATFORM_CALLOC_MACRO)
274 #error "MBEDTLS_PLATFORM_CALLOC_MACRO must be defined if MBEDTLS_PLATFORM_FREE_MACRO is"
277 #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\
278 ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
279 #error "MBEDTLS_PLATFORM_CALLOC_MACRO defined, but not all prerequisites"
282 #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\
283 defined(MBEDTLS_PLATFORM_STD_CALLOC)
284 #error "MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC cannot be defined simultaneously"
287 #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && !defined(MBEDTLS_PLATFORM_FREE_MACRO)
288 #error "MBEDTLS_PLATFORM_FREE_MACRO must be defined if MBEDTLS_PLATFORM_CALLOC_MACRO is"
291 #if defined(MBEDTLS_PLATFORM_MEMORY) && !defined(MBEDTLS_PLATFORM_C)
292 #error "MBEDTLS_PLATFORM_MEMORY defined, but not all prerequisites"
295 #if defined(MBEDTLS_PLATFORM_PRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
296 #error "MBEDTLS_PLATFORM_PRINTF_ALT defined, but not all prerequisites"
299 #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
300 #error "MBEDTLS_PLATFORM_PRINTF_MACRO defined, but not all prerequisites"
303 #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) &&\
304 ( defined(MBEDTLS_PLATFORM_STD_PRINTF) ||\
305 defined(MBEDTLS_PLATFORM_PRINTF_ALT) )
306 #error "MBEDTLS_PLATFORM_PRINTF_MACRO and MBEDTLS_PLATFORM_STD_PRINTF/MBEDTLS_PLATFORM_PRINTF_ALT cannot be defined simultaneously"
309 #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
310 #error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
313 #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
314 #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
317 #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) &&\
318 ( defined(MBEDTLS_PLATFORM_STD_SNPRINTF) ||\
319 defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) )
320 #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously"
323 #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\
324 !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS)
325 #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites"
328 #if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY)
329 #error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites"
332 #if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY)
333 #error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites"
336 #if defined(MBEDTLS_PLATFORM_STD_FREE) && !defined(MBEDTLS_PLATFORM_MEMORY)
337 #error "MBEDTLS_PLATFORM_STD_FREE defined, but not all prerequisites"
340 #if defined(MBEDTLS_PLATFORM_STD_EXIT) &&\
341 !defined(MBEDTLS_PLATFORM_EXIT_ALT)
342 #error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites"
345 #if defined(MBEDTLS_PLATFORM_STD_FPRINTF) &&\
346 !defined(MBEDTLS_PLATFORM_FPRINTF_ALT)
347 #error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites"
350 #if defined(MBEDTLS_PLATFORM_STD_PRINTF) &&\
351 !defined(MBEDTLS_PLATFORM_PRINTF_ALT)
352 #error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites"
355 #if defined(MBEDTLS_PLATFORM_STD_SNPRINTF) &&\
356 !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT)
357 #error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites"
360 #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \
361 !defined(MBEDTLS_OID_C) )
362 #error "MBEDTLS_RSA_C defined, but not all prerequisites"
365 #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) && \
366 ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_PKCS1_V21) )
367 #error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
370 #if defined(MBEDTLS_SSL_PROTO_SSL3) && ( !defined(MBEDTLS_MD5_C) || \
371 !defined(MBEDTLS_SHA1_C) )
372 #error "MBEDTLS_SSL_PROTO_SSL3 defined, but not all prerequisites"
375 #if defined(MBEDTLS_SSL_PROTO_TLS1) && ( !defined(MBEDTLS_MD5_C) || \
376 !defined(MBEDTLS_SHA1_C) )
377 #error "MBEDTLS_SSL_PROTO_TLS1 defined, but not all prerequisites"
380 #if defined(MBEDTLS_SSL_PROTO_TLS1_1) && ( !defined(MBEDTLS_MD5_C) || \
381 !defined(MBEDTLS_SHA1_C) )
382 #error "MBEDTLS_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
385 #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && ( !defined(MBEDTLS_SHA1_C) && \
386 !defined(MBEDTLS_SHA256_C) && !defined(MBEDTLS_SHA512_C) )
387 #error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
390 #if defined(MBEDTLS_SSL_PROTO_DTLS) && \
391 !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
392 !defined(MBEDTLS_SSL_PROTO_TLS1_2)
393 #error "MBEDTLS_SSL_PROTO_DTLS defined, but not all prerequisites"
396 #if defined(MBEDTLS_SSL_CLI_C) && !defined(MBEDTLS_SSL_TLS_C)
397 #error "MBEDTLS_SSL_CLI_C defined, but not all prerequisites"
400 #if defined(MBEDTLS_SSL_TLS_C) && ( !defined(MBEDTLS_CIPHER_C) || \
401 !defined(MBEDTLS_MD_C) )
402 #error "MBEDTLS_SSL_TLS_C defined, but not all prerequisites"
405 #if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_TLS_C)
406 #error "MBEDTLS_SSL_SRV_C defined, but not all prerequisites"
409 #if defined(MBEDTLS_SSL_TLS_C) && (!defined(MBEDTLS_SSL_PROTO_SSL3) && \
410 !defined(MBEDTLS_SSL_PROTO_TLS1) && !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
411 !defined(MBEDTLS_SSL_PROTO_TLS1_2))
412 #error "MBEDTLS_SSL_TLS_C defined, but no protocols are active"
415 #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \
416 defined(MBEDTLS_SSL_PROTO_TLS1_1) && !defined(MBEDTLS_SSL_PROTO_TLS1))
417 #error "Illegal protocol selection"
420 #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_TLS1) && \
421 defined(MBEDTLS_SSL_PROTO_TLS1_2) && !defined(MBEDTLS_SSL_PROTO_TLS1_1))
422 #error "Illegal protocol selection"
425 #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \
426 defined(MBEDTLS_SSL_PROTO_TLS1_2) && (!defined(MBEDTLS_SSL_PROTO_TLS1) || \
427 !defined(MBEDTLS_SSL_PROTO_TLS1_1)))
428 #error "Illegal protocol selection"
431 #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && !defined(MBEDTLS_SSL_PROTO_DTLS)
432 #error "MBEDTLS_SSL_DTLS_HELLO_VERIFY defined, but not all prerequisites"
435 #if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && \
436 !defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
437 #error "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE defined, but not all prerequisites"
440 #if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) && \
441 ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) )
442 #error "MBEDTLS_SSL_DTLS_ANTI_REPLAY defined, but not all prerequisites"
445 #if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) && \
446 ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) )
447 #error "MBEDTLS_SSL_DTLS_BADMAC_LIMIT defined, but not all prerequisites"
450 #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \
451 !defined(MBEDTLS_SSL_PROTO_TLS1) && \
452 !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
453 !defined(MBEDTLS_SSL_PROTO_TLS1_2)
454 #error "MBEDTLS_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites"
457 #if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) && \
458 !defined(MBEDTLS_SSL_PROTO_TLS1) && \
459 !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \
460 !defined(MBEDTLS_SSL_PROTO_TLS1_2)
461 #error "MBEDTLS_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites"
464 #if defined(MBEDTLS_SSL_TICKET_C) && !defined(MBEDTLS_CIPHER_C)
465 #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites"
468 #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \
469 !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1)
470 #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites"
473 #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) && \
474 !defined(MBEDTLS_X509_CRT_PARSE_C)
475 #error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
478 #if defined(MBEDTLS_THREADING_PTHREAD)
479 #if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
480 #error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"
482 #define MBEDTLS_THREADING_IMPL
485 #if defined(MBEDTLS_THREADING_ALT)
486 #if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
487 #error "MBEDTLS_THREADING_ALT defined, but not all prerequisites"
489 #define MBEDTLS_THREADING_IMPL
492 #if defined(MBEDTLS_THREADING_C) && !defined(MBEDTLS_THREADING_IMPL)
493 #error "MBEDTLS_THREADING_C defined, single threading implementation required"
495 #undef MBEDTLS_THREADING_IMPL
497 #if defined(MBEDTLS_VERSION_FEATURES) && !defined(MBEDTLS_VERSION_C)
498 #error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites"
501 #if defined(MBEDTLS_X509_USE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \
502 !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_PARSE_C) || \
503 !defined(MBEDTLS_PK_PARSE_C) )
504 #error "MBEDTLS_X509_USE_C defined, but not all prerequisites"
507 #if defined(MBEDTLS_X509_CREATE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \
508 !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_WRITE_C) || \
509 !defined(MBEDTLS_PK_WRITE_C) )
510 #error "MBEDTLS_X509_CREATE_C defined, but not all prerequisites"
513 #if defined(MBEDTLS_X509_CRT_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) )
514 #error "MBEDTLS_X509_CRT_PARSE_C defined, but not all prerequisites"
517 #if defined(MBEDTLS_X509_CRL_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) )
518 #error "MBEDTLS_X509_CRL_PARSE_C defined, but not all prerequisites"
521 #if defined(MBEDTLS_X509_CSR_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) )
522 #error "MBEDTLS_X509_CSR_PARSE_C defined, but not all prerequisites"
525 #if defined(MBEDTLS_X509_CRT_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) )
526 #error "MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites"
529 #if defined(MBEDTLS_X509_CSR_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) )
530 #error "MBEDTLS_X509_CSR_WRITE_C defined, but not all prerequisites"
int mbedtls_iso_c_forbids_empty_translation_units