Go to the documentation of this file.
30 #ifndef POLARSSL_CHECK_CONFIG_H
31 #define POLARSSL_CHECK_CONFIG_H
33 #if defined(POLARSSL_DEPRECATED_WARNING) && \
34 !defined(__GNUC__) && !defined(__clang__)
35 #error "POLARSSL_DEPRECATED_WARNING only works with GCC and Clang"
38 #if defined(POLARSSL_NET_C) && !defined(POLARSSL_HAVE_IPV6)
39 #if defined(POLARSSL_DEPRECATED_WARNING)
40 #warning "Using POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated"
42 #if defined(POLARSSL_DEPRECATED_REMOVED)
43 #define POLARSSL_HAVE_IPV6
47 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
48 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
51 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
52 #error "POLARSSL_CERTS_C defined, but not all prerequisites"
55 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
56 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
59 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
60 #error "POLARSSL_DHM_C defined, but not all prerequisites"
63 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
64 #error "POLARSSL_ECDH_C defined, but not all prerequisites"
67 #if defined(POLARSSL_ECDSA_C) && \
68 ( !defined(POLARSSL_ECP_C) || \
69 !defined(POLARSSL_ASN1_PARSE_C) || \
70 !defined(POLARSSL_ASN1_WRITE_C) )
71 #error "POLARSSL_ECDSA_C defined, but not all prerequisites"
74 #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
75 #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
78 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
79 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
80 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
81 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
82 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
83 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
84 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
85 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
86 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
87 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
88 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
89 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
90 #error "POLARSSL_ECP_C defined, but not all prerequisites"
93 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
94 !defined(POLARSSL_SHA256_C))
95 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
97 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
98 defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 64)
99 #error "CTR_DRBG_ENTROPY_LEN value too high"
101 #if defined(POLARSSL_ENTROPY_C) && \
102 ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \
103 && defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 32)
104 #error "CTR_DRBG_ENTROPY_LEN value too high"
106 #if defined(POLARSSL_ENTROPY_C) && \
107 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
108 #error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
111 #if defined(POLARSSL_GCM_C) && ( \
112 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
113 #error "POLARSSL_GCM_C defined, but not all prerequisites"
116 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
117 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
120 #if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
121 #error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
124 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
125 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
126 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
129 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
130 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
131 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
134 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
135 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
138 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
139 !defined(POLARSSL_ECDH_C)
140 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
143 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
144 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
145 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
146 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
149 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
150 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
151 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
152 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
155 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
156 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
157 !defined(POLARSSL_X509_CRT_PARSE_C) )
158 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
161 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
162 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) || \
163 !defined(POLARSSL_PKCS1_V15) )
164 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
167 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
168 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) || \
169 !defined(POLARSSL_PKCS1_V15) )
170 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
173 #if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_C)
174 #error "POLARSSL_MEMORY_C defined, but not all prerequisites"
177 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
178 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
179 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
182 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
183 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
186 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
187 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
190 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
191 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
194 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
195 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
198 #if defined(POLARSSL_PK_C) && \
199 ( !defined(POLARSSL_RSA_C) && !defined(POLARSSL_ECP_C) )
200 #error "POLARSSL_PK_C defined, but not all prerequisites"
203 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
204 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
207 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
208 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
211 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
212 #error "POLARSSL_PKCS11_C defined, but not all prerequisites"
215 #if defined(POLARSSL_PLATFORM_EXIT_ALT) && !defined(POLARSSL_PLATFORM_C)
216 #error "POLARSSL_PLATFORM_EXIT_ALT defined, but not all prerequisites"
219 #if defined(POLARSSL_PLATFORM_EXIT_MACRO) && !defined(POLARSSL_PLATFORM_C)
220 #error "POLARSSL_PLATFORM_EXIT_MACRO defined, but not all prerequisites"
223 #if defined(POLARSSL_PLATFORM_EXIT_MACRO) &&\
224 ( defined(POLARSSL_PLATFORM_STD_EXIT) ||\
225 defined(POLARSSL_PLATFORM_EXIT_ALT) )
226 #error "POLARSSL_PLATFORM_EXIT_MACRO and POLARSSL_PLATFORM_STD_EXIT/POLARSSL_PLATFORM_EXIT_ALT cannot be defined simultaneously"
229 #if defined(POLARSSL_PLATFORM_FPRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
230 #error "POLARSSL_PLATFORM_FPRINTF_ALT defined, but not all prerequisites"
233 #if defined(POLARSSL_PLATFORM_FPRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
234 #error "POLARSSL_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites"
237 #if defined(POLARSSL_PLATFORM_FPRINTF_MACRO) &&\
238 ( defined(POLARSSL_PLATFORM_STD_FPRINTF) ||\
239 defined(POLARSSL_PLATFORM_FPRINTF_ALT) )
240 #error "POLARSSL_PLATFORM_FPRINTF_MACRO and POLARSSL_PLATFORM_STD_FPRINTF/POLARSSL_PLATFORM_FPRINTF_ALT cannot be defined simultaneously"
243 #if defined(POLARSSL_PLATFORM_FREE_MACRO) &&\
244 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
245 #error "POLARSSL_PLATFORM_FREE_MACRO defined, but not all prerequisites"
248 #if defined(POLARSSL_PLATFORM_FREE_MACRO) &&\
249 defined(POLARSSL_PLATFORM_STD_FREE)
250 #error "POLARSSL_PLATFORM_FREE_MACRO and POLARSSL_PLATFORM_STD_FREE cannot be defined simultaneously"
253 #if defined(POLARSSL_PLATFORM_FREE_MACRO) && !defined(POLARSSL_PLATFORM_MALLOC_MACRO)
254 #error "POLARSSL_PLATFORM_MALLOC_MACRO must be defined if POLARSSL_PLATFORM_FREE_MACRO is"
257 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) &&\
258 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
259 #error "POLARSSL_PLATFORM_MALLOC_MACRO defined, but not all prerequisites"
262 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) &&\
263 defined(POLARSSL_PLATFORM_STD_MALLOC)
264 #error "POLARSSL_PLATFORM_MALLOC_MACRO and POLARSSL_PLATFORM_STD_MALLOC cannot be defined simultaneously"
267 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) && !defined(POLARSSL_PLATFORM_FREE_MACRO)
268 #error "POLARSSL_PLATFORM_FREE_MACRO must be defined if POLARSSL_PLATFORM_MALLOC_MACRO is"
271 #if defined(POLARSSL_PLATFORM_MEMORY) && !defined(POLARSSL_PLATFORM_C)
272 #error "POLARSSL_PLATFORM_MEMORY defined, but not all prerequisites"
275 #if defined(POLARSSL_PLATFORM_PRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
276 #error "POLARSSL_PLATFORM_PRINTF_ALT defined, but not all prerequisites"
279 #if defined(POLARSSL_PLATFORM_PRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
280 #error "POLARSSL_PLATFORM_PRINTF_MACRO defined, but not all prerequisites"
283 #if defined(POLARSSL_PLATFORM_PRINTF_MACRO) &&\
284 ( defined(POLARSSL_PLATFORM_STD_PRINTF) ||\
285 defined(POLARSSL_PLATFORM_PRINTF_ALT) )
286 #error "POLARSSL_PLATFORM_PRINTF_MACRO and POLARSSL_PLATFORM_STD_PRINTF/POLARSSL_PLATFORM_PRINTF_ALT cannot be defined simultaneously"
289 #if defined(POLARSSL_PLATFORM_SNPRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
290 #error "POLARSSL_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
293 #if defined(POLARSSL_PLATFORM_SNPRINTF_ALT) && ( defined(_WIN32)\
294 && !defined(EFIX64) && !defined(EFI32) )
295 #error "POLARSSL_PLATFORM_SNPRINTF_ALT defined but not available on Windows"
298 #if defined(POLARSSL_PLATFORM_SNPRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
299 #error "POLARSSL_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
302 #if defined(POLARSSL_PLATFORM_SNPRINTF_MACRO) &&\
303 ( defined(POLARSSL_PLATFORM_STD_SNPRINTF) ||\
304 defined(POLARSSL_PLATFORM_SNPRINTF_ALT) )
305 #error "POLARSSL_PLATFORM_SNPRINTF_MACRO and POLARSSL_PLATFORM_STD_SNPRINTF/POLARSSL_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously"
308 #if defined(POLARSSL_PLATFORM_STD_MEM_HDR) &&\
309 !defined(POLARSSL_PLATFORM_NO_STD_FUNCTIONS)
310 #error "POLARSSL_PLATFORM_STD_MEM_HDR defined, but not all prerequisites"
313 #if defined(POLARSSL_PLATFORM_STD_MALLOC) && !defined(POLARSSL_PLATFORM_MEMORY)
314 #error "POLARSSL_PLATFORM_STD_MALLOC defined, but not all prerequisites"
317 #if defined(POLARSSL_PLATFORM_STD_MALLOC) && !defined(POLARSSL_PLATFORM_MEMORY)
318 #error "POLARSSL_PLATFORM_STD_MALLOC defined, but not all prerequisites"
321 #if defined(POLARSSL_PLATFORM_STD_FREE) && !defined(POLARSSL_PLATFORM_MEMORY)
322 #error "POLARSSL_PLATFORM_STD_FREE defined, but not all prerequisites"
325 #if defined(POLARSSL_PLATFORM_STD_EXIT) &&\
326 !defined(POLARSSL_PLATFORM_EXIT_ALT)
327 #error "POLARSSL_PLATFORM_STD_EXIT defined, but not all prerequisites"
330 #if defined(POLARSSL_PLATFORM_STD_FPRINTF) &&\
331 !defined(POLARSSL_PLATFORM_FPRINTF_ALT)
332 #error "POLARSSL_PLATFORM_STD_FPRINTF defined, but not all prerequisites"
335 #if defined(POLARSSL_PLATFORM_STD_PRINTF) &&\
336 !defined(POLARSSL_PLATFORM_PRINTF_ALT)
337 #error "POLARSSL_PLATFORM_STD_PRINTF defined, but not all prerequisites"
340 #if defined(POLARSSL_PLATFORM_STD_SNPRINTF) &&\
341 !defined(POLARSSL_PLATFORM_SNPRINTF_ALT)
342 #error "POLARSSL_PLATFORM_STD_SNPRINTF defined, but not all prerequisites"
345 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
346 !defined(POLARSSL_OID_C) )
347 #error "POLARSSL_RSA_C defined, but not all prerequisites"
350 #if defined(POLARSSL_X509_RSASSA_PSS_SUPPORT) && \
351 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
352 #error "POLARSSL_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
355 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
356 !defined(POLARSSL_SHA1_C) )
357 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
360 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
361 !defined(POLARSSL_SHA1_C) )
362 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
365 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
366 !defined(POLARSSL_SHA1_C) )
367 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
370 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
371 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
372 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
375 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
376 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
379 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
380 !defined(POLARSSL_MD_C) )
381 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
384 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
385 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
388 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
389 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
390 !defined(POLARSSL_SSL_PROTO_TLS1_2))
391 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
394 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
395 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
396 #error "Illegal protocol selection"
399 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
400 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
401 #error "Illegal protocol selection"
404 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
405 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
406 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
407 #error "Illegal protocol selection"
410 #if defined(POLARSSL_SSL_ENCRYPT_THEN_MAC) && \
411 !defined(POLARSSL_SSL_PROTO_TLS1) && \
412 !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
413 !defined(POLARSSL_SSL_PROTO_TLS1_2)
414 #error "POLARSSL_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites"
417 #if defined(POLARSSL_SSL_EXTENDED_MASTER_SECRET) && \
418 !defined(POLARSSL_SSL_PROTO_TLS1) && \
419 !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
420 !defined(POLARSSL_SSL_PROTO_TLS1_2)
421 #error "POLARSSL_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites"
424 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
425 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
426 !defined(POLARSSL_CIPHER_MODE_CBC) )
427 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
430 #if defined(POLARSSL_SSL_CBC_RECORD_SPLITTING) && \
431 !defined(POLARSSL_SSL_PROTO_SSL3) && !defined(POLARSSL_SSL_PROTO_TLS1)
432 #error "POLARSSL_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites"
435 #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \
436 !defined(POLARSSL_X509_CRT_PARSE_C)
437 #error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
440 #if defined(POLARSSL_THREADING_PTHREAD)
441 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
442 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
444 #define POLARSSL_THREADING_IMPL
447 #if defined(POLARSSL_THREADING_ALT)
448 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
449 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
451 #define POLARSSL_THREADING_IMPL
454 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
455 #error "POLARSSL_THREADING_C defined, single threading implementation required"
457 #undef POLARSSL_THREADING_IMPL
459 #if defined(POLARSSL_VERSION_FEATURES) && !defined(POLARSSL_VERSION_C)
460 #error "POLARSSL_VERSION_FEATURES defined, but not all prerequisites"
463 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
464 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
465 !defined(POLARSSL_PK_PARSE_C) )
466 #error "POLARSSL_X509_USE_C defined, but not all prerequisites"
469 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
470 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
471 !defined(POLARSSL_PK_WRITE_C) )
472 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
475 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
476 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
479 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
480 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
483 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
484 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
487 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
488 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
491 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
492 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"